package bdcin.fachada;

import java.util.List;

import bdcin.classesbasicas.Area;
import bdcin.classesbasicas.Docente;
import bdcin.classesbasicas.DocenteUtilizado;
import bdcin.classesbasicas.Documento;
import bdcin.classesbasicas.Usuario;
import bdcin.excecoes.BuscarException;
import bdcin.excecoes.EditarException;
import bdcin.excecoes.EmailException;
import bdcin.excecoes.InserirException;
import bdcin.excecoes.RemoverException;
import br.cin.ufpe.in1118.middleware.distribution.services.GenericStub;
import br.cin.ufpe.in1118.middleware.distribution.services.ObjectReference;
import br.cin.ufpe.in1118.middleware.exceptions.RemoteException;

public class IBDCIn_Stub extends GenericStub implements IBDCIn {
	
	public IBDCIn_Stub(ObjectReference objectReference) {
		super(objectReference);
	}

	@Override
	public void alterar(Docente arg0) throws EditarException {
		try {
			super.execute("alterar", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void alterar(DocenteUtilizado arg0) throws EditarException {
		try {
			super.execute("alterar", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void alterar(Usuario arg0) throws EditarException {
		try {
			super.execute("alterar", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void alterar(Area arg0) throws EditarException {
		try {
			super.execute("alterar", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void atualizarDocumento(Documento arg0) throws EditarException {
		try {
			super.execute("atualizarDocumento", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Docente> buscaDocentePorArea(String arg0)
			throws BuscarException {
		try {
			return (List<Docente>) super.execute("buscaDocentePorArea", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Docente buscaDocentePorEmailUnico(String arg0)
			throws BuscarException {
		try {
			return (Docente) super.execute("buscaDocentePorEmailUnico", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Docente> buscaDocentePorLogin(String arg0)
			throws BuscarException {
		try {
			return (List<Docente>) super.execute("buscaDocentePorLogin", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Docente buscaDocentePorLoginUnico(String arg0)
			throws BuscarException {
		try {
			return (Docente) super.execute("buscaDocentePorLoginUnico", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Docente buscaDocentePorNomeUnico(String arg0) throws BuscarException {
		try {
			return (Docente) super.execute("buscaDocentePorNomeUnico", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public DocenteUtilizado buscaDocenteUtilizadoPorDocente(Long arg0)
			throws BuscarException {
		try {
			return (DocenteUtilizado) super.execute("buscaDocenteUtilizadoPorDocente", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Usuario> buscaUsuarioPorLogin(String arg0)
			throws BuscarException {
		try {
			return (List<Usuario>) super.execute("buscaUsuarioPorLogin", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Usuario buscaUsuarioPorLoginUnico(String arg0)
			throws BuscarException {
		try {
			return (Usuario) super.execute("buscaUsuarioPorLoginUnico", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Usuario buscaUsuarioPorNomeUnico(String arg0) throws BuscarException {
		try {
			return (Usuario) super.execute("buscaUsuarioPorNomeUnico", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Area buscarArea(Long arg0) throws BuscarException {
		try {
			return (Area) super.execute("buscarArea", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Area buscarAreaPorNome(String arg0) throws BuscarException {
		try {
			return (Area) super.execute("buscarAreaPorNome", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Documento> buscarConteudo(String arg0) {
		try {
			return (List<Documento>) super.execute("buscarConteudo", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Docente buscarDocente(Long arg0) throws BuscarException {
		try {
			return (Docente) super.execute("buscarDocente", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Docente> buscarDocentePorNome(String arg0)
			throws BuscarException {
		try {
			return (List<Docente>) super.execute("buscarDocentePorNome", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public DocenteUtilizado buscarDocenteUtilizado(Long arg0)
			throws BuscarException {
		try {
			return (DocenteUtilizado) super.execute("buscarDocenteUtilizado", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Documento buscarDocumento(Long arg0) throws BuscarException {
		try {
			return (Documento) super.execute("buscarDocumento", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Documento> buscarDocumentoPorAluno(String arg0)
			throws BuscarException {
		try {
			return (List<Documento>) super.execute("buscarDocumentoPorAluno", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Documento buscarDocumentoPorAlunoDissertacao(String arg0)
			throws BuscarException {
		try {
			return (Documento) super.execute("buscarDocumentoPorAlunoDissertacao", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Documento buscarDocumentoPorAlunoTG(String arg0)
			throws BuscarException {
		try {
			return (Documento) super.execute("buscarDocumentoPorAlunoTG", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Documento buscarDocumentoPorAlunoTese(String arg0)
			throws BuscarException {
		try {
			return (Documento) super.execute("buscarDocumentoPorAlunoTese", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Documento> buscarDocumentoPorArea(String arg0)
			throws BuscarException {
		try {
			return (List<Documento>) super.execute("buscarDocumentoPorArea", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Documento> buscarDocumentoPorCoOrientador(String arg0)
			throws BuscarException {
		try {
			return (List<Documento>) super.execute("buscarDocumentoPorCoOrientador", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Documento> buscarDocumentoPorOrientador(String arg0)
			throws BuscarException {
		try {
			return (List<Documento>) super.execute("buscarDocumentoPorOrientador", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Documento> buscarDocumentoPorTitulo(String arg0)
			throws BuscarException {
		try {
			return (List<Documento>) super.execute("buscarDocumentoPorTitulo", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Usuario buscarUsuario(Long arg0) throws BuscarException {
		try {
			return (Usuario) super.execute("buscarUsuario", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Usuario> buscarUsuarioPorNome(String arg0)
			throws BuscarException {
		try {
			return (List<Usuario>) super.execute("buscarUsuarioPorNome", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public void enviarEmail(String arg0, String arg1, String arg2)
			throws EmailException {
		try {
			super.execute("enviarEmail", arg0, arg1, arg2);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void inserir(Docente arg0) throws InserirException {
		try {
			super.execute("inserir", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void inserir(DocenteUtilizado arg0) throws InserirException {
		try {
			super.execute("inserir", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void inserir(Usuario arg0) throws InserirException {
		try {
			super.execute("inserir", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void inserir(Area arg0) throws InserirException {
		try {
			super.execute("inserir", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void inserir(Documento arg0) throws InserirException {
		try {
			super.execute("inserir", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Area> listarAreas() {
		try {
			return (List<Area>) super.execute("listarAreas");
		} catch (RemoteException e) {
			e.printStackTrace();
		}	
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<DocenteUtilizado> listarDocentesUtilizados()
			throws BuscarException {
		try {
			return (List<DocenteUtilizado>) super.execute("listarDocentesUtilizados");
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public void removerArea(Long arg0) throws RemoverException {
		try {
			super.execute("removerArea", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void removerDocente(Long arg0) throws RemoverException {
		try {
			super.execute("removerDocente", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void removerDocenteUtilizado(Long arg0) throws RemoverException {
		try {
			super.execute("removerDocenteUtilizado", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void removerDocumento(Long arg0) throws RemoverException {
		try {
			super.execute("removerDocumento", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void removerUsuario(Long arg0) throws RemoverException {
		try {
			super.execute("removerUsuario", arg0);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
	}
}
